Skip to content

Rename upgrade to update#40

Open
matbout wants to merge 3 commits intomainfrom
chore/rename-upgrade-to-update
Open

Rename upgrade to update#40
matbout wants to merge 3 commits intomainfrom
chore/rename-upgrade-to-update

Conversation

@matbout
Copy link
Contributor

@matbout matbout commented Mar 9, 2026

Description

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Performance improvement
  • Refactoring (no functional changes)
  • Documentation update
  • CI/CD changes
  • Dependencies update

Checklist

Build & Tests

  • npm install completes without errors
  • npm test passes all tests

Code Quality

  • Code follows the project's coding standards
  • No new compiler warnings introduced
  • Error handling is appropriate

Documentation

  • Code comments added for complex logic
  • Public APIs are documented
  • README updated (if applicable)

Security

  • No sensitive data (keys, credentials) committed
  • No new security vulnerabilities introduced

Testing

Related Issues


By submitting this PR, I confirm that my contribution is made under the terms of the project's license.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the “upgrade” terminology across the unit-test framework into “update”, aligning naming in the core runtime, e2e test contracts, tests, and documentation while preserving the underlying behavior (queued bytecode replacement effective on the next block).

Changes:

  • Renames upgrade-related runtime internals and messages in ContractRuntime (e.g., pending upgrade state → pending update state).
  • Updates e2e contracts and tests to use update(...) / Updatable* naming and updated WASM build outputs.
  • Updates documentation links and terminology to “Updatable Contracts” and the updated phase naming.

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/e2e/imports/UpdateFromAddress.test.ts Renames test flow and calls from upgrade to update, plus updated runtime import and WASM path.
test/e2e/contracts/updatable-contract/runtime/UpdatableContractRuntime.ts Renames the test runtime wrapper class and selector/call from upgrade to update.
test/e2e/contracts/updatable-contract/contract/tsconfig.json Adds contract TS config for the updatable v1 contract build.
test/e2e/contracts/updatable-contract/contract/index.ts Points the contract entrypoint to UpdatableContract.
test/e2e/contracts/updatable-contract/contract/asconfig.json Updates the WASM output names to match the new updatable naming.
test/e2e/contracts/updatable-contract/contract/UpdatableContract.ts Renames the contract class and method from upgrade→update and calls updateContractFromExisting.
test/e2e/contracts/updatable-contract-v2/contract/tsconfig.json Adds contract TS config for the updatable v2 contract build.
test/e2e/contracts/updatable-contract-v2/contract/index.ts Points the v2 entrypoint to UpdatableContractV2.
test/e2e/contracts/updatable-contract-v2/contract/asconfig.json Updates the v2 WASM output names to match the new updatable naming.
test/e2e/contracts/updatable-contract-v2/contract/UpdatableContractV2.ts Renames the v2 contract class to UpdatableContractV2.
src/opnet/modules/ContractRuntime.ts Renames internal “upgrade” pending/guard state and related helper methods/messages to “update”.
scripts/buildTestContracts.js Updates build paths from upgradeable-* directories to updatable-*.
docs/writing-tests/custom-contracts.md Updates documentation link text/path to “Updatable Contracts”.
docs/api-reference/blockchain.md Updates example from upgrade(...) to update(...) and wording.
docs/advanced/updatable-contracts.md Updates headings/content to use “update” terminology and the renamed internal mechanisms.
docs/advanced/transaction-simulation.md Updates nav link to the updatable contracts doc.
docs/advanced/cross-contract-calls.md Updates nav link to the updatable contracts doc.
docs/advanced/consensus-rules.md Adjusts wording to “contract updates”.
docs/README.md Updates advanced topic link text/path to “Updatable Contracts”.
SECURITY.md Updates referenced mechanism name to applyPendingBytecodeUpdate.
README.md Updates advanced topics wording from upgrades→updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants